home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / SciAn / src / ScianNetObjects.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  5KB  |  115 lines

  1. /* ScianNetObjects.h John R. Murray */
  2.  
  3. #define NO_END_OF_PTRS 0
  4. #define NO_PTR_TO_REALS 1
  5. #define NO_PTR_TO_INTS 2
  6. #define NO_PTR_TO_OBJPTRS 3
  7.  
  8. typedef struct PointerDescriberStruct {
  9.     unsigned long ptrOffset;    /* location of pointer. */
  10.     unsigned long number;    /* number of things pointed to */
  11.     int type;            /* type of things pointed to */
  12. } *PtrDescPtr;
  13.  
  14. typedef int NetFlagsTyp;
  15. #define HTON_NETFLAGSTYP(x) htons(x)    /* to be consistent with FlagsTyp */
  16. #define NTOH_NETFLAGSTYP(x) ntohs(x)
  17.  
  18. #define NO_NULL_CLASS 0x1L
  19. #define NO_NULL_VARS 0x2L
  20. #define NO_NULL_METHODS 0x4L
  21. #define NO_NULL_DEPENDS 0x8L
  22.  
  23. #define NO_LAST_VAR 0L
  24.  
  25. /* different types of network packets (This is allowing for multiple ways
  26.  * of shipping one type of object (e.g. reals) */
  27.  
  28. extern ObjPtr allPublishedObjects;
  29.  
  30. #ifdef PROTO
  31. void InitNetObjects();
  32. void KillNetObjects();
  33. int PublishObject(ObjPtr);
  34. void UnPublishObject(ObjPtr);
  35. void TransmitObject(ObjPtr, ObjPtr, Bool);
  36. unsigned long GetNetworkID();
  37. ObjPtr FindPublishedObject(unsigned long);
  38. ObjPtr ReceiveObject(ObjPtr, unsigned long);
  39. ObjPtr TransmitExtraStuffRealArrayRaw(ObjPtr, ObjPtr);
  40. ObjPtr ReceiveExtraStuffRealArrayRaw(ObjPtr, ObjPtr);
  41. ObjPtr TransmitExtraStuffRealArrayAscii(ObjPtr, ObjPtr);
  42. ObjPtr ReceiveExtraStuffRealArrayAscii(ObjPtr, ObjPtr);
  43. ObjPtr TransmitExtraStuffObjectArray(ObjPtr, ObjPtr);
  44. ObjPtr ReceiveExtraStuffObjectArray(ObjPtr, ObjPtr);
  45. ObjPtr TransmitExtraStuffObjectArraySpecial(ObjPtr, ObjPtr);
  46. ObjPtr ReceiveExtraStuffObjectArraySpecial(ObjPtr, ObjPtr);
  47. #else
  48. void InitNetObjects();
  49. void KillNetObjects();
  50. int PublishObject();
  51. void UnPublishObject();
  52. void TransmitObject();
  53. unsigned long GetNetworkID();
  54. ObjPtr FindPublishedObject();
  55. ObjPtr ReceiveObject();
  56. ObjPtr TransmitExtraStuffRealArrayRaw();
  57. ObjPtr ReceiveExtraStuffRealArrayRaw();
  58. ObjPtr TransmitExtraStuffRealArrayAscii();
  59. ObjPtr ReceiveExtraStuffRealArrayAscii();
  60. ObjPtr TransmitExtraStuffObjectArray();
  61. ObjPtr ReceiveExtraStuffObjectArray();
  62. ObjPtr TransmitExtraStuffObjectArraySpecial();
  63. ObjPtr ReceiveExtraStuffObjectArraySpecial();
  64. #endif
  65.  
  66. /* messages */                /* saying... */
  67. #define    NO_MESG_OBJECT        "OBJ!"    /* <variable format>. Here's an object */
  68. #define NO_MESG_SEND_OBJECT    "SNDO"    /* <objid>. Send me this object */
  69. #define NO_MESG_DELETE_OBJECT    "JNKO"    /* I'm not interested in this object anymore, you can delete it */
  70. #define NO_MESG_MAKEVAR        "MKVR"    /* <objid> <varnum>. (NIY) Make this var for me */
  71. #define NO_MESG_DIDMAKEVAR    "YSVR"    /* <objid> <varnum>. (NIY) I made this var for you */
  72. #define NO_MESG_DIDNTMAKEVAR    "NOVR"    /* <objid> <varnum>. (NIY) I didn't need to make this var */
  73. #define NO_MESG_GETVAR        "GTVR"    /* <objid> <varnum>. I want the value of this var of this object */
  74. #define NO_MESG_GETELEMENT    "GTEL"    /* <objid> <elnum> get element of object array */
  75. #define NO_MESG_GOTVAR        "GOTV"    /* <objid> <varnum> <objid>. Here's the ID of this var of this object */
  76.                         /* objid == 0 ==> NULLOBJ */
  77. #define NO_MESG_GOTELEMENT    "GOTE"    /* <objid> <elnum> <objid> here 'tis */
  78. #define NO_MESG_UPDATEVAR    "UPVR"    /* <objid> <varnum>. value of var changed */
  79. #define NO_MESG_UPDATEVAR_ID    "UPV2"    /* UPVR style 2 includes netid */
  80. #define NO_MESG_UPDATEVAR_SEND    "UPV3"    /* UPVR style 3 includes object */
  81. #define NO_MESG_MACHINE_IRIS4D    "SG4D"    /* I'm an SGI 4D */
  82. #define NO_MESG_MACHINE_RS6000    "RS6K"    /* I'm an IBM RS6000 */
  83. #define NO_MESG_MACHINE_UNKNOWN    "UNKN"    /* I don't know what I am */
  84.  
  85. #define NET_PLAINOBJECT        "OBJ1"    /* plain old object. no trailing data*/
  86. #define NET_INTEGER        "INT1"    /* std integer */
  87. #define NET_REAL        "REA1"    /* std. real, first cut format. */
  88. #define NET_REALARRAYRAW    "RAR1"    /* obj in arrayClass class, raw fmt */
  89. #define NET_REALARRAYASCII    "RAR2"    /* obj in arrayClass class, ascii fmt */
  90. #define NET_OBJECTARRAY        "OAR1"    /* obj in objectArrayClass class */
  91. #define NET_STRING        "STR1"    /* std string */
  92. #define NET_ICONDATASET        "IDS1"    /* obj in iconDataset class */
  93. #define NET_ICON1DVECTOR    "I1V1"    /* obj in icon1DVector class */
  94. #define NET_ICON2DVECTOR    "I2V1"    /* obj in icon2DVector class */
  95. #define NET_ICON3DVECTOR    "I3V1"    /* obj in icon3DVector class */
  96. #define NET_ICON4DVECTOR    "I4V1"    /* obj in icon4DVector class */
  97. #define NET_ICON1DSCALAR    "I1S1"    /* obj in icon1DScalar class */
  98. #define NET_ICON2DSCALAR    "I2S1"    /* obj in icon2DScalar class */
  99. #define NET_ICON3DSCALAR    "I3S1"    /* obj in icon3DScalar class */
  100. #define NET_ICON4DSCALAR    "I4S1"    /* obj in icon4DScalar class */
  101. #define NET_DATA1DVECTOR    "D1V1"    /* obj in data1DVector class */
  102. #define NET_DATA2DSCALAR    "D2S1"    /* obj in data2DScalar class */
  103. #define NET_DATA3DSCALAR    "D3S1"    /* obj in data3DScalar class */
  104. #define NET_DATA3DUNSTRUCT    "D3U1"    /* obj in dat3DUnstructSurface class */
  105. #define NET_DATASET        "DAT1"    /* obj in generic dataset class */
  106. #define NET_DATAFORM        "DFM1"    /* obj in dataform class */
  107. #define NET_TIMEDOBJECT        "TOB1"    /* obj in timedObjClass */
  108. #define NET_PALETTE        "PLT1"    /* obj in paletteClass */
  109. #define NET_VISICON        "VSI1"    /* obj in visIcon, whatever that is */
  110. #define NET_UNIMPLEMENTED    "Huh?"    /* transmit/receive unimplemented for this class */
  111.  
  112. #ifndef FASTSOCKET
  113. #define FASTSOCKET    997
  114. #endif
  115.